import request from '../utils/request'
import { ADMIN_API_BASE_URL } from '../config'

// api就是请求接口 post是方法  统一接口 放在 因为可能不止一个地方用
export const postAdminLoginApi = (params) => request.post(`${ADMIN_API_BASE_URL}/admin/login`, params)
export const getAdminUserApi = () => request.get(`${ADMIN_API_BASE_URL}/admin/list`)
export const deleteAdminUserApi = (params) => request.post(`${ADMIN_API_BASE_URL}/admin/delete`, params)
export const postAddAdminApi = (params) => request.post(`${ADMIN_API_BASE_URL}/admin/add`, params)
export const getAdminDetailApi = (adminname) => request.get(`${ADMIN_API_BASE_URL}/admin/detail`, {
  params: { adminname },
})
export const postAddUpdataApi = (params) => request.post(`${ADMIN_API_BASE_URL}/admin/update`, params)
